package org.bling.star.common.command;

import java.io.Serializable;

/**
 * @Describe: 请求基类
 * @Date: 2024/5/23
 * @Author: szz
 */
public class BaseCommand implements Serializable {
    private static final long serialVersionUID = 4785190603489852556L;
    private CommandType commandType;

    public BaseCommand() {
    }

    public CommandType getCommandType() {
        return this.commandType;
    }

    public void setCommandType(CommandType commandType) {
        this.commandType = commandType;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof BaseCommand)) return false;
        final BaseCommand other = (BaseCommand) o;
        if (!other.canEqual(this)) return false;
        final Object this$commandType = this.getCommandType();
        final Object other$commandType = other.getCommandType();
        return this$commandType == null ? other$commandType == null : this$commandType.equals(other$commandType);
    }

    protected boolean canEqual(final Object other) {
        return other instanceof BaseCommand;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $commandType = this.getCommandType();
        result = result * PRIME + ($commandType == null ? 43 : $commandType.hashCode());
        return result;
    }

    public String toString() {
        return "BaseCommand(commandType=" + this.getCommandType() + ")";
    }
}
